package org.example.purchase.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.example.purchase.mapper.PurchaseListMapper;
import org.example.purchase.domain.PurchaseList;
import org.example.purchase.service.IPurchaseListService;

/**
 * 采购清单Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-07-18
 */
@Service
public class PurchaseListServiceImpl implements IPurchaseListService 
{
    @Autowired
    private PurchaseListMapper purchaseListMapper;

    /**
     * 查询采购清单
     * 
     * @param purchaseListId 采购清单主键
     * @return 采购清单
     */
    @Override
    public PurchaseList selectPurchaseListByPurchaseListId(Long purchaseListId)
    {
        return purchaseListMapper.selectPurchaseListByPurchaseListId(purchaseListId);
    }

    /**
     * 查询采购清单列表
     * 
     * @param purchaseList 采购清单
     * @return 采购清单
     */
    @Override
    public List<PurchaseList> selectPurchaseListList(PurchaseList purchaseList)
    {
        return purchaseListMapper.selectPurchaseListList(purchaseList);
    }

    /**
     * 新增采购清单
     * 
     * @param purchaseList 采购清单
     * @return 结果
     */
    @Override
    public int insertPurchaseList(PurchaseList purchaseList)
    {
        return purchaseListMapper.insertPurchaseList(purchaseList);
    }

    /**
     * 修改采购清单
     * 
     * @param purchaseList 采购清单
     * @return 结果
     */
    @Override
    public int updatePurchaseList(PurchaseList purchaseList)
    {
        return purchaseListMapper.updatePurchaseList(purchaseList);
    }

    /**
     * 批量删除采购清单
     * 
     * @param purchaseListIds 需要删除的采购清单主键
     * @return 结果
     */
    @Override
    public int deletePurchaseListByPurchaseListIds(Long[] purchaseListIds)
    {
        return purchaseListMapper.deletePurchaseListByPurchaseListIds(purchaseListIds);
    }

    /**
     * 删除采购清单信息
     * 
     * @param purchaseListId 采购清单主键
     * @return 结果
     */
    @Override
    public int deletePurchaseListByPurchaseListId(Long purchaseListId)
    {
        return purchaseListMapper.deletePurchaseListByPurchaseListId(purchaseListId);
    }
}